package com.rd.student.dashuju.wangbo.exercise02;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;

public class OlympicGames {
    public static void main(String[] args) {
        ArrayList<String> arrayList = new ArrayList<>();
        arrayList.add("科特迪瓦");
        arrayList.add("阿根廷");
        arrayList.add("澳大利亚");
        arrayList.add("塞尔维亚");
        arrayList.add("荷兰");
        arrayList.add("尼日利亚");
        arrayList.add("日本");
        arrayList.add("美国");
        arrayList.add("中国");
        arrayList.add("新西兰");
        arrayList.add("巴西");
        arrayList.add("比利时");
        arrayList.add("韩国");
        arrayList.add("喀麦隆");
        arrayList.add("洪都拉斯");
        arrayList.add("意大利");
        Random random = new Random();
        while (arrayList.size()>1){
            Collections.shuffle(arrayList);
            win(arrayList);
        }
    }
    public static void win(ArrayList<String> arrayList){
        ArrayList<String> arrayListwin = new ArrayList<>();
        for (int i = 2; i <= arrayList.size()+1; i++) {
            System.out.println(arrayList.get(i) + "vs" +arrayList.get(i-2));
//            for (int j = 0; j < arrayList.size(); j++) {
//                i = i+2;
//                arrayListwin.add(arrayList.get(i));
//            }
        }

//        System.out.println(arrayListwin);
    }
}
